<?php
// 管理用户收货地址
namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class ShippingAddress extends Model
{
    protected $fillable = [
        'wechat_user_id',
        'receiver_name',
        'receiver_phone',
        'receiver_address',
        'is_default'
    ];

    protected $casts = [
        'is_default' => 'boolean'
    ];

    public function user()
    {
        return $this->belongsTo(WechatUser::class, 'wechat_user_id');
    }
} 